﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Warehouse_Bar_Code
{
    public partial class 入库信息 : Form
    {
        public 入库信息()
        {
            InitializeComponent();
        }
        private void InStock_Load(object sender, EventArgs e)
        {

            //取消自动列
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = DBH.Select("select * from Goods,Depot,Provider,InStock");

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string GName = textBox1.Text;
            string CName = textBox2.Text;
            string sql = $"select * from Goods,Depot,Provider,InStock where GName,CName like '%{GName}%','%{CName}%'";
            //取消自动列
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = DBH.Select(sql);

        }

        private void 添加ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            入库信息添加 IS = new 入库信息添加();
            IS.Show();
        }
    }
}
